package com.yutel.phone.juny.service;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;

public class IncomingSMSReceiver extends BroadcastReceiver {
	@Override
	public void onReceive(Context context, Intent intent) {
		SharedPreferences prefs = PreferenceManager
				.getDefaultSharedPreferences(context);
		if (prefs.getBoolean("smsenabled", false)) {
			Bundle bundle = intent.getExtras();
			if (bundle != null) {
				Intent sms = new Intent(context, IncomingSMSIntentService.class);
				sms.putExtras(bundle);
				context.startService(sms);
			}
		}
	}
}
